/**
 * 
 */
package Game_Start;

import java.util.Scanner;

/**
 * @author Jiang Zhiyan
 *
 * 2021年5月16日 下午4:23:37
 */
public class _07减肥计划if与switch {
 public static void main(String[] args) {

	 Scanner sc= new Scanner(System.in);
	 int week= sc.nextInt();
	 System.out.println("if方法");
	 plan(week);   //  if方法
	 System.out.println("switch方法");
	 planGame(week); //switch方法
}
// if方法
   public static void plan(int week) {
	   if(week<1||week>7) {
			 System.out.println("您输入的日期有误！");
		 }else if(week==1) {
			 System.out.println("跑步");
		 }else if(week==2) {
			 System.out.println("游泳");
		 }else if(week==3) {
			 System.out.println("慢走");
		 }else if(week==4) {
			 System.out.println("动感单车");
		 }else if(week==5) {
			 System.out.println("拳击");
		 }else if(week==6) {
			 System.out.println("爬山");
		 }else{
			 System.out.println("好好吃一顿");
		 }
   }
 
    public static void planGame(int week) {
    	switch(week) {
    	case 1: System.out.println("跑步");
    	        break;
    	case 2: System.out.println("游泳");
        		break;
    	case 3: System.out.println("慢走");
        		break;
    	case 4: System.out.println("动感单车");
        		break;
    	case 5: System.out.println("拳击");
        		break;
    	case 6: System.out.println("爬山");
                break;
    	case 7: System.out.println("好好吃一顿");
                break;
        default:System.out.println("您输入的日期有误！");
    	}
    }
}
